/**
 * 
 */
package com.demo2do.fms.admin.dao.supplier;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.demo2do.fms.entity.driver.EsbBlackWhiteList;

/**
 * @author Guangli Yan
 *
 */
@Dao("hibernate")
public interface EsbBlackWhiteListDao {

    /**
     * @param citizenCode
     * @return
     */
    @Query("FROM EsbBlackWhiteList WHERE idCard = :citizenCode ORDER BY dealTime DESC ")
    List<EsbBlackWhiteList> listByCitizenCode(@Variable("citizenCode") String citizenCode);

    /**
     * @param citizenCode
     * @return
     */
    @Query("FROM EsbBlackWhiteList WHERE idCard = :citizenCode ORDER BY dealTime DESC ")
    EsbBlackWhiteList findLastByCitizenCode(@Variable("citizenCode") String citizenCode);

}
